package HP.com.bank_2.wangyu.util;

import java.util.Scanner;

import HP.com.bank_2.wangyu.*;
import HP.com.bank_2.wangyu.view.UserUI;

public class BankDeal {
    private BankDeal() {
        System.out.println("初始化ATM!");
    }

    //登录
    public static void login() {
        UserUI.printUI(0);
        Scanner scanner_login = new Scanner(System.in);
        boolean flag = false;
        System.out.println("当前位置-->登录\n请输入用户名和密码进行登录.\n提示:管理员账号\\密码:admin");
        System.out.println("用户名:");
        String user_no = scanner_login.nextLine();
        System.out.println("密码:");
        String user_pwd = scanner_login.nextLine();

/*        for (int i = 0; i < BankMain.no.length; i++) {
            // System.out.println("验证密码:");
            int isadmin = -1;
            if (user_no.equals(BankMain.no[i]) && user_pwd.equals(BankMain.pwd[i])) {
                if (user_no.equals("admin")) {
                    flag = true;
                    BankMain.userlogin = 0;
                    break;
                } else {
                    flag = true;
                    //System.out.println(BankMain.no[i]);
                    //System.out.println(BankMain.pwd[i]);
                    //loginuser = i;
                    BankMain.userlogin = i;
                    // System.out.println("i = " + i);
                    userLog(i,0,-1,-1);
                    break;

                }
            }
        }
        if (flag) {
            System.out.println("登录成功!");
            printUI(1);
            mainMenu();
        } else {
            System.out.println("登录失败!");
            printUI(1);
        }*/
    }

    //欢迎页
    public void welcome() {
        UserUI.printUI(0);
        Scanner scanner = new Scanner(System.in);
        UserUI.printUI(3);
        UserUI.printUI(1);
        System.out.println("请输入1--3进行选择:");
        try {
            int welcome = scanner.nextInt();
            switch (welcome) {
                case 1://登陆

                    break;
                case 2://注册

                    break;
                case 3://更新日志

                    break;
                case 4:

                    break;
            }
        } catch (Exception e) {
            System.out.println("输入有误!");
        }

    }
}
